//
// Sequential Linked Stack
// Created by Win10 on 2022/10/31.
//

#ifndef C_DATA_STRUCTURE_SQL_STACK_H
#define C_DATA_STRUCTURE_SQL_STACK_H

typedef int ElemType;

typedef struct LinkNode {
    ElemType data;
    struct LinkNode *next;
} *LiStack, LinkNode;


bool InitStack(LiStack &S);

bool StackEmpty(LiStack S);

bool Push(LiStack &S, ElemType x);

bool Pop(LiStack &S, ElemType &x);

bool GetTop(LiStack S, ElemType &x);

bool DestoryStack(LiStack &S);

#endif //C_DATA_STRUCTURE_SQL_STACK_H
